package org.adit.spring.hibernate.parser;

import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.rmi.RemoteException;
import java.util.Scanner;

import org.adit.spring.hibernate.parser.entity.FleetEngineOutput;
import org.tempuri.IRWFleetEngineProxy;

public class Caller {

public void callerMeth() throws FileNotFoundException{
	Scanner scanner = new Scanner(new FileInputStream("c:/xxx.xml"));

	
	String testeDeSaida = "";
	// /System.out.println(route.getXml());
	try {
		FleetEngineOutput fleetEngineOutput = new FleetEngineOutput();
		IRWFleetEngineProxy fleetClient = new IRWFleetEngineProxy();
		String optimizeStartRespostaID = fleetClient
				.optimizeStart(scanner.next());

		String getResultTemp = "";

		if (!optimizeStartRespostaID.equals("")) {
			getResultTemp = fleetClient.getResult(optimizeStartRespostaID);
		}
		System.out.println(getResultTemp);
	

	} catch (RemoteException e) {
		// TODO Auto-generated catch block
		e.printStackTrace();
	}

}


}
	

